package io.renren.modules.task.controller;

import io.renren.modules.task.entity.MtCcWarehousePointEntity;
import io.renren.modules.task.entity.TestEntity;
import io.renren.modules.task.entity.TestEntity2;
import io.renren.modules.task.service.MtCcWarehousePointService;
import io.renren.modules.task.service.SqlServerService;
import io.renren.modules.task.service.TestService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * @Author: 蔡翔
 * @Date: 2019/9/27 11:09
 * @Version 1.0
 */
public class sqlMsqlTest extends Thread {

    @Autowired
    private MtCcWarehousePointService mtCcWarehousePointService;

    private final static Logger logger = LoggerFactory.getLogger(sqlMsqlTest.class);

    @Override
    public void run() {
        while (true){
            SqlServerService sqlServerService = new SqlServerService();
            List<TestEntity2> testEntities = null;
            List<MtCcWarehousePointEntity> list = null;
            testEntities = sqlServerService.multiDatasource();
            System.out.println("sql-Server"+testEntities);
            list = mtCcWarehousePointService.list();
            System.err.println("mysql上的："+list);
            try {
                sleep(2000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }

    }
}
